<ion-view view-title="我的康豆">
  	<header class="bar bar-header Redbg" ng-class="{true:'ios_bar',false:''}[Is_Ios]">
  		<a href="javascript:void(0);" ui-sref="app.vip" class="button button-icon ion-ios-arrow-left Yellowfont-12" ng-class="{true:'ios_show',false:''}[Is_Ios]"></a>
        <h1 side="left" menu-toggle="left" class="title Yellowfont-17" ng-class="{true:'ios_show',false:''}[Is_Ios]">我的康豆</h1>
    <!--<p href="javascript:void(0);" ui-sref="app.vip_integral_rule" class="noborder Redbg Yellowfont-12 floatRight">康豆规则</p>-->
        <a href="javascript:void(0);" ui-sref="app.vip_integral_rule" class="button button-icon Redbg Yellowfont-12" ng-class="{true:'ios_show',false:''}[Is_Ios]">康豆规则</a>
    </header>
  <ion-content class="vip_intergral">
	<div class="Redbg">
		<div class="circlBox">
			<img class="marginTop-25" ng-click="spend_integrate()" src="img/icons/jifen_big.svg" alt="" width="90"/>
		</div>
		<p class="Yellowfont-32 marginTop-50">{{integralData.number}}</p>
		<p class="Yellowfont-15 margin-5">康豆</p>
	</div>
	<div class="lineHeight-40">
		<i class="daoju"></i>
		<p class="Grayfont-15 nomargin marginTop-8 marginLeft-10">康豆记录</p>
	</div>
	<div class="Whitebg">
		<div class="listBorder" ng-repeat="item in integralListData">
			<div class="floatLeft">
				<p class="Defaultfont-15 nomargin noline marginTop-10">{{item.mode}}</p>
				<p class="Grayfont-12 marginTop-10 nomargin noline">{{item.createtime | date:'yyyy-MM-dd HH:mm:ss'}}</p>
			</div>
			<p class="Redfont-18 lineHeight-70 floatRight">{{item.num > 0 ? ('+' + item.num): item.num}}康豆</p>
			<div style="clear: both;"></div>
		</div>
		<!--<div class="listBorder">
			<div class="floatLeft">
				<p class="Defaultfont-15 nomargin noline marginTop-10">打开App</p>
				<p class="Grayfont-12 marginTop-10 omargin noline">2016-11-21 09:00</p>
			</div>
			<p class="Redfont-18 floatRight lineHeight-70">+1康豆</p>
			<div style="clear: both;"></div>
		</div>
		<div class="listBorder">
			<div class="floatLeft">
				<p class="Defaultfont-15 omargin noline marginTop-10">鼻腔</p>
				<p class="Grayfont-12 marginTop-10 omargin noline">2016-11-20 09:00</p>
			</div>
			<p class="Redfont-18 floatRight lineHeight-70">+1康豆</p>
			<div style="clear: both;"></div>
		</div>
		<div class="noborder marginLeft-10 marginRight-10">
			<div class="floatLeft">
				<p class="Defaultfont-15 omargin noline marginTop-10">气血</p>
				<p class="Grayfont-12 marginTop-10 omargin noline">2016-11-20 09:00</p>
			</div>
			<p class="Redfont-18 floatRight lineHeight-70">+1康豆</p>
			<div style="clear: both;"></div>
		</div>-->
	</div>
	<!--<i class="Grayfont-15 loadding"><ion-spinner class="spinner spinner-balanced" icon="ios-small"></ion-spinner></i>-->

    <ion-infinite-scroll ng-if="!hasmore_integral" immediate-check="false" on-infinite="integralList(userMes.id)" distance="1%"></ion-infinite-scroll>


      <script id="templates/integral-modal.html" type="text/ng-template">
          <ion-modal-view>
              <ion-header-bar class="bar bar-header bar-positive" align-title="center">
                  <h1 class="title">康豆消费</h1>
                  <button class="button button-clear button-primary" ng-click="integrateModal.hide()">取消</button>
              </ion-header-bar>
              <ion-content class="padding">
                  <div class="list">
                      <label class="item item-input item-floating-label">
                          <input style="padding-left: 5px; height: 46px; font-size: 14px;" type="text" ng-model="shop.code" placeholder="店铺识别码">
                      </label>
                      <label class="item item-input item-floating-label">
                          <input style="padding-left: 5px; height: 46px; font-size: 14px;" type="number" ng-model="shop.integrate" placeholder="康豆数量">
                      </label>
                      <label class="item item-input item-floating-label">
                          <input style="padding-left: 5px; height: 46px; font-size: 14px;" type="text" ng-model="shop.summary" placeholder="备注">
                      </label>

                      <button class="button button-full button-positive" style="background-color: #FA5252; margin-top: 20px;" ng-click="saveShopIntegrate()">使用康豆</button>
                  </div>
              </ion-content>
          </ion-modal-view>
      </script>
  </ion-content>
</ion-view>
